package com.fiveGroup.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.fiveGroup.pojo.UserFavoriteProduct;
import com.fiveGroup.pojo.vo.ProductFavoriteVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 86188
 * @description 针对表【user_favorite_product(用户商品收藏表)】的数据库操作Mapper
 * @createDate 2025-09-26 15:01:12
 * @Entity com.fiveGroup.pojo.UserFavoriteProduct
 */
public interface UserFavoriteProductMapper extends BaseMapper<UserFavoriteProduct> {

    int getFavoriteCount(
            @Param("userId") Long userId,
            @Param("productId") Long productId
    );

    List<ProductFavoriteVo> getFavorite(IPage<ProductFavoriteVo> page, @Param(Constants.WRAPPER) QueryWrapper<UserFavoriteProduct> queryWrapper);

}




